﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ExamSystem.Mdeol;
using System.Data;
namespace ExamSystem.DAL
{
    public class TpagerquestionDAL
    {
        /// <summary>
        /// 查询课程信息
        /// </summary>
        public List<Tkecheng> selectkckecheng()
        {
            List<Tkecheng> list = new List<Tkecheng>();
            string sql = "select d.tkcName,b.tqName,b.tqType,b.tqScore,c.tpName from tpagerquestion a,tquestion b,tpager c,tkecheng d where a.tqId=b.tqId and c.tpId=a.tpId and d.tkcId=b.tkcId";
            DataSet ds = DBhepter.GetDataSet(sql);
            DataTable dt = ds.Tables[0];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr = dt.Rows[i];
                int tpqId= int.Parse(dr["tpqId"].ToString());
                int tpId= int.Parse(dr["tpId"].ToString());
                string tqId = dr["tqId"].ToString();
                string tqtype = dr["tqtype"].ToString();
                string tpname = dr["tpname"].ToString();
                string tqname = dr["tqname"].ToString();
                float tqscore = float.Parse(dr["sqscore"].ToString());
                Tpager tp = new Tpager(tpId,tpname,null,null);
               // list.Add(ts);
            }
            return list;
        }



    }
}